Class SimplyPresentable::PresenterProxy
In: vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb
Parent: Builder::BlankSlate

Methods

Public Class methods

[Source]

    # File vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb, line 37
37:     def initialize(renderer, presented, additional_presenter_names)
38:       @renderer = renderer
39:       @presented = presented
40:       build_presenter_map(additional_presenter_names)
41:     end

Public Instance methods

[Source]

    # File vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb, line 53
53:     def cache_renderers
54:       @presenter_map.values.uniq.each { |presenter| presenter.cache_renderer }
55:     end

[Source]

    # File vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb, line 48
48:     def renderer=(new_renderer)
49:       @presenter_map.values.uniq.each { |presenter| presenter.renderer = new_renderer }
50:       @renderer = new_renderer
51:     end

[Source]

    # File vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb, line 43
43:     def respond_to?(*args)
44:       method = args.first
45:       %w{presenter_proxy renderer= cache_renderers restore_renderers}.include?(method.to_s) || presenter_respond_to?(*args) || @presented.respond_to?(args.first)
46:     end

[Source]

    # File vendor/plugins/simply_presentable/lib/simply_presentable/presenter.rb, line 57
57:     def restore_renderers
58:       @presenter_map.values.uniq.each { |presenter| presenter.restore_renderer }
59:     end

[Validate]